splitting into squares